package com.nuoniu.sibanyun.entity.finance;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.nuoniu.sibanyun.common.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 收付款单主表
 * </p>
 *
 * @author 小啊刚
 * @since 2021-04-19
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("fa_receive_payment_main")
@ApiModel(value = "v_receive_payment_main对象", description = "付款单主表")
public class VReceivePaymentMain extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "公司id")
    @TableField("company_id")
    private Integer companyId;

    @ApiModelProperty(value = "账套id")
    @TableField("account_id")
    private Integer accountId;

    @ApiModelProperty(value = "类型1:收 2:付")
    @TableField("type")
    private Integer type;

    @ApiModelProperty(value = "数据来源")
    @TableField("data_source")
    private String dataSource;

    @ApiModelProperty(value = "单据编码")
    @TableField("voucher_code")
    private String voucherCode;

    @ApiModelProperty(value = "单据日期")
    @TableField("voucher_date")
    private String voucherDate;

    @ApiModelProperty(value = "单据状态")
    @TableField("voucher_state")
    private Integer voucherState;

    @ApiModelProperty(value = "单据类型:销售收款/其它收款/保证金收款	销售业务退款/其它业务退款/保证金退款 ")
    @TableField("voucher_type")
    private Integer voucherType;

    @ApiModelProperty(value = "科目id")
    @TableField("accounting_id")
    private Integer accountingId;

    @ApiModelProperty(value = "科目编码")
    @TableField("accounting_code")
    private String accountingCode;

    @ApiModelProperty(value = "科目名称")
    @TableField("accounting_name")
    private String accountingName;

    @ApiModelProperty(value = "往来单位类型 1供应商2客户3员工4部门5其它往来单位")
    @TableField("partner_type")
    private Integer partnerType;

    @ApiModelProperty(value = "往来单位id")
    @TableField("partner_id")
    private Integer partnerId;

    @ApiModelProperty(value = "往来单位")
    @TableField("partner_name")
    private String partnerName;

    @ApiModelProperty(value = "部门id")
    @TableField("office_id")
    private Integer officeId;

    @ApiModelProperty(value = "部门名称")
    @TableField("office_name")
    private String officeName;

    @ApiModelProperty(value = "个人id")
    @TableField("personal_id")
    private Integer personalId;

    @ApiModelProperty(value = "个人名称")
    @TableField("personal_name")
    private String personalName;

    @ApiModelProperty(value = "摘要")
    @TableField("digest")
    private String digest;

    @ApiModelProperty(value = "应收/应付金额")
    @TableField("should_amount")
    private BigDecimal shouldAmount;

    @ApiModelProperty(value = "实收/实付金额")
    @TableField("amount")
    private BigDecimal amount;

    @ApiModelProperty(value = "已核销金额")
    @TableField("verification_amount")
    private BigDecimal verificationAmount;

    @ApiModelProperty(value = "结算状态: 0:未结 1:已结")
    @TableField("settle_state")
    private Integer settleState;

    @ApiModelProperty(value = "记账状态: 0:未记 1:已记")
    @TableField("book_state")
    private Integer bookState;

    @ApiModelProperty(value = "期初标识0:否 1:是")
    @TableField("begin_start_flag")
    private Integer beginStartFlag;

    @ApiModelProperty(value = "是否成生凭证0:否 1:是")
    @TableField("is_create_voucher")
    private Integer isCreateVoucher;

    @ApiModelProperty(value = "客户/供应商")
    @TableField("crm_id")
    private Integer crmId;

    @ApiModelProperty(value = "客户/供应商名称")
    @TableField("crm_name")
    private String crmName;

    @ApiModelProperty(value = "创建人")
    @TableField("create_user_id")
    private Integer createUserId;

    @ApiModelProperty(value = "创建人姓名")
    @TableField("create_user_name")
    private String createUserName;

    @ApiModelProperty(value = "创建日期")
    @TableField("create_date")
    private LocalDateTime createDate;

    @ApiModelProperty(value = "提交人id")
    @TableField("submit_user_id")
    private Integer submitUserId;

    @ApiModelProperty(value = "提交人姓名")
    @TableField("submit_user_name")
    private String submitUserName;

    @ApiModelProperty(value = "提交日期")
    @TableField("submit_date")
    private LocalDateTime submitDate;

    @ApiModelProperty(value = "审核人id")
    @TableField("reviewer_user_id")
    private Integer reviewerUserId;

    @ApiModelProperty(value = "审核人姓名")
    @TableField("reviewer_user_name")
    private String reviewerUserName;

    @ApiModelProperty(value = "审核日期")
    @TableField("reviewer_date")
    private LocalDateTime reviewerDate;

    @ApiModelProperty(value = "修改人id")
    @TableField("update_user_id")
    private Integer updateUserId;

    @ApiModelProperty(value = "修改人名称")
    @TableField("update_user_name")
    private String updateUserName;

    @ApiModelProperty(value = "修改日期")
    @TableField("update_date")
    private LocalDateTime updateDate;

    @ApiModelProperty(value = "来源单id")
    @TableField("source_voucher_id")
    private Integer sourceVoucherId;

    @ApiModelProperty(value = "来源单据")
    @TableField("source_voucher_type")
    private String sourceVoucherType;

    @ApiModelProperty(value = "来源日期")
    @TableField("source_voucher_date")
    private LocalDate sourceVoucherDate;

    @ApiModelProperty(value = "来源单号")
    @TableField("source_voucher_code")
    private String sourceVoucherCode;

    @ApiModelProperty(value = "明细列表")
    @TableField(exist = false)
    private List<VReceivePaymentDetail> orderDetailList;


}
